package com.wing.cabinet.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.cabinet.model.entity.CellInventoryInout;
import com.wing.cabinet.model.entity.CellInventoryInoutDetail;
import com.wing.cabinet.model.entity.UseInventoryInout;
import com.wing.cabinet.model.request.CellInventoryInoutDetailForm;
import com.wing.cabinet.model.request.CellInventoryInoutForm;
import com.wing.cabinet.model.response.CellInventoryInoutDetailVO;
import com.wing.common.utils.JsonResult;
import com.wing.order.model.request.OrderReceiveLoadForm;

import java.util.List;
import java.util.Map;

/**
 * 售刀柜上货(上货主表无展示)/领取明细-Service
 *
 * @author
 */
public interface CellInventoryInoutDetailService extends IService<CellInventoryInoutDetail> {

    /**
     * 添加
     *
     * @param cellInventoryInoutDetailForm
     * @return
     */
    int add(CellInventoryInoutDetailForm cellInventoryInoutDetailForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<CellInventoryInoutDetailVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<CellInventoryInoutDetailVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    CellInventoryInoutDetailVO get4appById(Long id);

    CellInventoryInoutDetailVO getCellById(Long inoutId);

    CellInventoryInout inventoryOut(List<CellInventoryInoutDetailForm> list, String deviceCode, CellInventoryInout.BusinessType businessType, UseInventoryInout.BusinessType useBusinessType,Boolean byPassword,Long storesRequisitionId, String uuid);

    void inventoryOutEmpty(List<CellInventoryInoutDetailForm> list, String deviceCode, CellInventoryInout.BusinessType businessType, UseInventoryInout.BusinessType useBusinessType);

    CellInventoryInout inventoryOut(CellInventoryInoutForm cellInventoryInoutForm);

    CellInventoryInout inventoryOut4Simple(OrderReceiveLoadForm orderReceiveLoadForm);

    CellInventoryInout inventoryOut4BatchSimple(OrderReceiveLoadForm orderReceiveLoadForm);


    void inventoryIn(CellInventoryInoutForm cellInventoryInoutForm);
    void inventoryIn(OrderReceiveLoadForm orderReceiveLoadForm);
    void inventoryIn4Simple(OrderReceiveLoadForm orderReceiveLoadForm);
    void inventoryIn4BatchSimple(OrderReceiveLoadForm orderReceiveLoadForm);


    void inventoryIn(List<CellInventoryInoutForm> cellInventoryInoutFormList);

    JsonResult isInventoryIn(CellInventoryInoutDetailForm cellInventoryInoutDetailForm);

    JsonResult verifyPermissions(List<CellInventoryInoutDetailForm> list);

    JsonResult verifyPermissionsNew(List<CellInventoryInoutDetailForm> list);

    JsonResult<String> sendTest(String mailTo);
}
